<%@ page language="java" pageEncoding="UTF-8"%>  
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>  
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ include file="../header.jsp"%>
<jsp:include page="../js.jsp"/>
<div class="content-wrapper" style="font-family: '微软雅黑';">
<input type="hidden" id="ctx" value="<%=request.getContextPath()%>"/>
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      ${module } <small>Control panel</small>
    </h1>
    <ol class="breadcrumb">
      <li><a href=""><i class="fa fa-dashboard"></i>主页</a></li>
      <li class="active">雇主列表</li>
    </ol>
  </section>
  <!-- Main content -->
  <section class="content">
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
          <div class="box-header">
          <div>  
    <div>
        创建开始时间： <input type="text" id="start_time"/>
        创建结束时间： <input type="text" id="end_time"/>
        雇主手机号： <input type="text" id="phone"/>
    </div>
    <div>
        状态： <select id="status">  
  <option value ="">请选择</option>  
  <option value ="0">禁用</option>  
  <option value ="1">正常</option>  
</select> 
        性别： <select id="sex">  
  <option value ="">请选择</option>  
  <option value ="0">保密</option>  
  <option value ="1">男</option>  
  <option value ="1">女</option>  
</select> 
       
        <input type="button" onclick="search1()"  value="查询">  
    </div>
    </div>  
          </div>
          <!-- /.box-header -->
          <div class="box-body">
<table id="example" class="display">
        <thead>
            <tr style="background-color: #97CBFF;color: white">
                  <th>昵称</th>
                  <th>手机号</th>
                  <th>头像</th>
                  <th>性别</th>
                  <th>状态</th>
                  <th>注册时间</th>
                  <th>推送码</th>
                  <th>mac地址</th>
            </tr>
        </thead>
 
        <tbody>
			<tr>
				
			</tr>
        </tbody>
    </table>
    </div>
          <!-- /.box-body -->
        </div>
        <!-- /.box -->
      </div>
      <!-- /.col -->
    </div>
    <!-- /.row -->
    <!--  显示下面的分页控件  -->
  </section>
  <!-- /.content -->
</div>
<script type="text/javascript">
$('#start_time').datetimepicker({lang:'ch',timepicker:true});
$('#end_time').datetimepicker({lang:'ch',timepicker:true});


var table;
$(document).ready(function() {
	table= $('#example').DataTable( {  
	        "pagingType": "simple_numbers",//设置分页控件的模式  
	         searching: false,//屏蔽datatales的查询框  
	         aLengthMenu:[10,50,100],//设置一页展示10条记录  
	         "bLengthChange": true,//屏蔽tables的一页展示多少条记录的下拉列表  
	         "oLanguage": {  //对表格国际化  
	            "sLengthMenu": "每页显示 _MENU_条",    
	            "sZeroRecords": "没有找到符合条件的数据",    
	        //  "sProcessing": "&lt;img src=’./loading.gif’ /&gt;",    
	            "sInfo": "当前第 _START_ - _END_ 条　共计 _TOTAL_ 条",    
	            "sInfoEmpty": "木有记录",    
	            "sInfoFiltered": "(从 _MAX_ 条记录中过滤)",    
	            "sSearch": "搜索：",    
	            "oPaginate": {    
	            "sFirst": "首页",    
	            "sPrevious": "前一页",    
	            "sNext": "后一页",    
	            "sLast": "尾页"    
	                   
	            }    
	        },  
	    "processing": true, //打开数据加载时的等待效果  
	        "serverSide": true,//打开后台分页  
	        "ajax": {  
	            "url":$('#ctx').val()+"/user/page",   
	            "dataSrc": "aaData",   
	            "data": function ( d ) {  
	                var start_time = $('#start_time').val();  
	                var end_time = $('#end_time').val();  
	                var phone = $('#phone').val();  
	                var status = $('#status').val();  
	                var sex = $('#sex').val();  
	                //添加额外的参数传给服务器  
	                d.start_time = start_time;  
	                d.end_time = end_time;  
	                d.status = status;  
	                d.sex = sex;  
	                d.phone = phone;  
	            } 
	       
	        } ,  
	        "columns": [  
	            { "data": "nickname" },  
	            { "data": "telephone" },  
	            { "data": function(obj){
	            	return "<img height='80' width='80' src='"+obj.headerpath+"'  alt='雇主头像' />";
	            } },  
	            { "data": function(obj){
	            	if(obj.sex==0){
	            		return "保密";
	            	}else if(obj.sex==1){
	            		return "男";
	            	}else if(obj.sex==2){
	            		return "女";
	            	}
	            }},  
	            { "data": function(obj){
	            	if(obj.status==0){
	            		return "禁用";
	            	}else if(obj.status==1){
	            		return "正常";
	            	}
	            }},  
	            { "data": function(obj){
	            	return obj.createtime;
	            }},  
	            { "data": "isvAccountId" },  
	            { "data": "mac_addr" }
	            
	        ]  
	      
	    } );  
	} );  
	
function search1()  
{  
	table.ajax.reload();  
} 





</script>

<%@ include file="../footer.jsp"%>





